import os


#返回绝对路径
print(os.path.abspath(r'E:\PycharmProjects\python_230901\homework\wusihan\12-29\ddt_parctice\os.py'))
#返回文件名
print(os.path.basename(r'E:\PycharmProjects\python_230901\homework\wusihan\12-29\ddt_parctice\os.py'))
#返回所在目录
print(os.path.dirname(r'E:\PycharmProjects\python_230901\homework\wusihan\12-29\ddt_parctice\os.py'))

#返回当前文件的绝对路径
print(os.path.abspath(__file__))

#返回当前文件的目录
print(os.path.dirname(__file__))
#返回当前文件的名字
print(os.path.basename(__file__))

